    <!-- Mainly scripts -->
    <script src="__PUBLIC__/admin/js/jquery-2.1.1.js"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>


    <!-- Custom and plugin javascript -->
    <script src="__PUBLIC__/admin/js/inspinia.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/pace/pace.min.js"></script>

    <!-- jQuery UI -->
    <script src="__PUBLIC__/admin/js/plugins/jquery-ui/jquery-ui.min.js"></script>
    <!-- FooTable -->
    <script src="__PUBLIC__/admin/js/plugins/footable/footable.all.min.js"></script>
    <!-- SUMMERNOTE -->
    <script src="__PUBLIC__/admin/js/plugins/summernote/summernote.min.js"></script>

    <!-- Page-Level Scripts -->
    <script>
        $(document).ready(function() {

            $('.footable').footable();

            $('.summernote').summernote();

            $('.delete').click(function(){
                if (!confirm("是否删除!")) {
                        return false;
                }
            })

        });
        $("#upload").click(function(){
            $.upload({
                url: "__PUBLIC__/uploads", 
                fileName: 'file', 
                dataType: 'text',
                onSend: function() {
                    return true;
                },
                onComplate: function(data) {
                    $("#img").val(data);
                    $("#preview").html('<img style="height:80px;" src="U('+data+')">');
                }
            });
        })
        function level1change(){
            var id = $('#level1').val();
            $.get("{:U('Admin/Product/getCatalog')}",{id:id},function(data){
                var str = "";
                for (var i = 0; i < data.length; i++) {
                    str +='<option value="'+data[i].id+'">'+data[i].name+'</option>';
                }
                $('#level2').html(str);
                level2change();
            })
        }
        function level2change(){
            var id = $('#level2').val();
            $.get("{:U('Admin/Product/getCatalog')}",{id:id},function(data){
                var str = "";
                for (var i = 0; i < data.length; i++) {
                    str +='<option value="'+data[i].id+'">'+data[i].name+'</option>';
                }
                $('#level3').html(str);
            })
        }
        $("#level1").change(level1change);
        $("#level2").change(level2change);
        level1change();
    </script>